The Web Game Developer's Cookbook: Using JavaScript and HTML5 to Develop Games (Game Design) by Evan Burchard

The Web Game Developer's Cookbook: Using JavaScript and HTML5 to Develop Games (Game Design) by Evan Burchard

Author:Evan Burchard [Burchard, Evan]
Language: eng
Format: azw3
Publisher: Pearson Education
Published: 2013-03-23T04:00:00+00:00


* * *

Note

For the playground interface, gameQuery makes use of the convention of jQuery’s style of using getters and setters, which is why there are two functions called playground. In this case, as in jQuery (for example, jQuery’s text() function), the getter is the version without parameters passed, playground(), and the setter is the version that contains parameters, playground({height: PLAYGROUND_HEIGHT, width: PLAYGROUND_WIDTH, keyTracker: true}).

* * *

The last thing to do is run the startGame function on playground, which reveals an outer-space scene with mathematical functional symbols for stars when you load the html file. If you open the index.html file in a browser, you should see something like Figure 7.1, with the larger (closer) symbols moving more quickly than the smaller (further away) symbols.

Figure 7.1. Math space



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.